attribute vec4 a_position;
uniform mat4 u_formMatrix;
attribute vec4 a_Color;
varying vec4 v_Color;
attribute vec2 a_texCoord;
varying vec2 v_texCoord;
uniform float u_time;
varying float v_time;
mat4 rotation3d(vec3 axis, float angle) {
  axis = normalize(axis);
  float s = sin(angle);
  float c = cos(angle);
  float oc = 1.0 - c;

  return mat4(
    oc * axis.x * axis.x + c,           oc * axis.x * axis.y - axis.z * s,  oc * axis.z * axis.x + axis.y * s,  0.0,
    oc * axis.x * axis.y + axis.z * s,  oc * axis.y * axis.y + c,           oc * axis.y * axis.z - axis.x * s,  0.0,
    oc * axis.z * axis.x - axis.y * s,  oc * axis.y * axis.z + axis.x * s,  oc * axis.z * axis.z + c,           0.0,
    0.0,                                0.0,                                0.0,                                1.0
  );
}
 const mat4 scaleMatrix =mat4( 
   vec4(1,0,0,0),
   vec4( 0,1,0,0),
    vec4(  0,0,1,0),
     vec4( 0,0,0,1) );
void main(void){
  vec4 position =rotation3d(vec3(0.,1.,0.),u_time)* a_position;
  gl_Position=u_formMatrix*scaleMatrix*position;
  v_texCoord=a_texCoord;
  v_Color=a_Color;

  v_time = u_time;

}